sysroot: Close sysroot fd in finalize
authorColin Walters <walters@verbum.org>
Sun, 19 Apr 2015 19:25:05 +0000 (15:25 -0400)
committerColin Walters <walters@verbum.org>
Mon, 20 Apr 2015 20:51:05 +0000 (16:51 -0400)
Just noticed this while I was going to add another one there.

src/libostree/ostree-sysroot.c

index b18c6b706fbe4539b86827940b0107e0b85fdfb8..62558037c2b5ade775a6dbf2e9cab0c3bec4af66 100644 (file)
@@ -66,6 +66,9 @@ ostree_sysroot_finalize (GObject *object)
   g_clear_object (&self->sepolicy);
   g_clear_object (&self->repo);
 
+  if (self->sysroot_fd != -1)
+    (void) close (self->sysroot_fd);
+
   G_OBJECT_CLASS (ostree_sysroot_parent_class)->finalize (object);
 }